import { BrowserRouter as Router, Routes, Route } from 'react-router-dom';
import Home from './pages/Home';
import Auth from './pages/Auth';
import CreateCopywriting from './pages/CreateCopywriting';
import CopywritingDetail from './pages/CopywritingDetail';
import Profile from './pages/Profile';
import Search from './pages/Search';
import ResetPassword from './pages/ResetPassword';
import Layout from './components/layout/Layout';
import './index.css';

function App() {
  return (
    <Router>
      <Layout>
        <Routes>
          <Route path="/" element={<Home />} />
          <Route path="/auth" element={<Auth />} />
          <Route path="/create" element={<CreateCopywriting />} />
          <Route path="/copywriting/:id" element={<CopywritingDetail />} />
          <Route path="/profile/:userId" element={<Profile />} />
          <Route path="/search" element={<Search />} />
          <Route path="/reset-password" element={<ResetPassword />} />
        </Routes>
      </Layout>
    </Router>
  );
}

export default App;
